﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PostSharp.CodeModel;
using PostSharp.CodeWeaver;

namespace MicroContainer.CompileTime
{
   internal class ContainerBuilderCleanerAdvice : IAdvice
   {
      #region IAdvice Members
      public int Priority
      {
         get { return 0; }
      }
      public bool RequiresWeave(WeavingContext context)
      {
         return true;
      }
      public void Weave(WeavingContext context, InstructionBlock block)
      {
         TypeDefDeclaration type = context.Method.DeclaringType;
         type.Methods.Clear();
      }
      #endregion
   }
}
